home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Cool Demos, SDKs, & Tools / Demos⁄Tools⁄Offers / Eiffel for CW beta 3 / EiffelS2 / LIBRARY / MOTEL / MOTEL.c < prev    next >
Text File  |  1999-05-02  |  2KB  |  51 lines

  1. /*------------------------------------------------------------------*/
  2. /* Eiffel/S II MacOS Runtime                                         */
  3. /*------------------------------------------------------------------*/
  4. /* Author    : Ian Joyner                                               */
  5. /* Release   : 1.0                                                  */
  6. /* Date      : Dec. 1997                                            */
  7. /* Copyright : Ian Joyner                                            */
  8. /*------------------------------------------------------------------*/
  9.  
  10. #include <Types.h>
  11. #include <ToolUtils.h>
  12. #include <Eiffel2.h>
  13.  
  14. /* NOTE: Any Eiffel INTEGER parameters must go through here, so we can
  15.          convert the 32 bit INTEGER into INTEGER16. It might be a good
  16.          idea to introduce and INTEGER16 type into the compiler FOR
  17.          EXTERNAL PURPOSES ONLY in order to avoid most of these
  18.          glue routines. */
  19.          
  20. /* Naming convention:
  21.      I have adopted the convention in this module the names:
  22.          platform_<module>_routinename */         
  23.  
  24. Str255 scratch_string;
  25.  
  26. INTEGER platform_hi_word (INTEGER w)
  27. {
  28.     return ((INTEGER) HiWord (w));
  29. }
  30.  
  31. INTEGER platform_lo_word (INTEGER w)
  32. {
  33.     return ((INTEGER) LoWord (w));
  34. }
  35.  
  36. /********************************************************************/
  37. /*                                                                    */
  38. /*                                MOUSE                                */
  39. /*                                                                    */
  40. /********************************************************************/
  41.  
  42. void platform_get_mouse (INTEGER *x, INTEGER *y)
  43. {
  44.     Point p;
  45.     
  46.     GetMouse (&p);
  47.     
  48.     *x = p.h;
  49.     *y = p.v;
  50. }
  51.